#!/bin/sh

./timing > rastercode_odd.s && ./timing `tail -1 rastercode_odd.s | awk '{print $2}'` > rastercode_even.s

cat rastercode_odd.s  | sed -e 's/sprites/sprites2/' -e 's/screen0/screen0a/' -e 's/screen1/screen1a/' -e 's/screen2/screen2a/' -e 's/screen3/screen3a/' > rastercode_odd_1.s
cat rastercode_even.s | sed -e 's/sprites/sprites2/' -e 's/screen0/screen0a/' -e 's/screen1/screen1a/' -e 's/screen2/screen2a/' -e 's/screen3/screen3a/' > rastercode_even_1.s

cat rastercode_odd.s  | sed -e 's/sprites/sprites1/' -e 's/screen0/screen0b/' -e 's/screen1/screen1b/' -e 's/screen2/screen2b/' -e 's/screen3/screen3b/' > rastercode_odd_2.s
cat rastercode_even.s | sed -e 's/sprites/sprites1/' -e 's/screen0/screen0b/' -e 's/screen1/screen1b/' -e 's/screen2/screen2b/' -e 's/screen3/screen3b/' > rastercode_even_2.s
